// index.js
Page({
  data: {
    isLoading: false,
    nbFrontColor: '#000000',
    nbBackgroundColor: '#ffffff',
    imgs: [{
      id: '001',
      src: 'https://res.wx.qq.com/wxdoc/dist/assets/img/0.4cb08bb4.jpg',
      text: 'aaa'
    },
    {
      id: '002',
      src: 'https://ts1.cn.mm.bing.net/th/id/R-C.0871ecac6dae7481a45bf3bcde6e2a98?rik=cWDJMHoNjXF%2bDQ&riu=http%3a%2f%2fimg.aiimg.com%2fuploads%2fuserup%2f1206%2f131IJ1F60.jpg&ehk=XX0p%2fQLKfEe5J6xAez%2fiCOSyYCUVb1bawXIxAcDXcOI%3d&risl=&pid=ImgRaw&r=0',
      text: 'aaa'
    },
    {
      id: '003',
      src: 'https://ts1.cn.mm.bing.net/th/id/R-C.0871ecac6dae7481a45bf3bcde6e2a98?rik=cWDJMHoNjXF%2bDQ&riu=http%3a%2f%2fimg.aiimg.com%2fuploads%2fuserup%2f1206%2f131IJ1F60.jpg&ehk=XX0p%2fQLKfEe5J6xAez%2fiCOSyYCUVb1bawXIxAcDXcOI%3d&risl=&pid=ImgRaw&r=0',
      text: 'aaa'
    },
    {
      id: '004',
      src: 'https://tse2-mm.cn.bing.net/th/id/OIP-C.If0zZ6RJ3iGDOPGQsq-BSAHaFj?w=238&h=180&c=7&r=0&o=5&pid=1.7',
      text: 'aaa'
    },
    {
      id: '005',
      src: 'https://tse2-mm.cn.bing.net/th/id/OIP-C.If0zZ6RJ3iGDOPGQsq-BSAHaFj?w=238&h=180&c=7&r=0&o=5&pid=1.7',
      text: 'aaa'
    },
    {
      id: '006',
      src: 'https://res.wx.qq.com/wxdoc/dist/assets/img/0.4cb08bb4.jpg',
      text: 'aaa'
    },

    {
      id: '007',
      src: 'https://tse3-mm.cn.bing.net/th/id/OIP-C.yIKOobCl8zz1068zJGi0eAHaLH?w=135&h=203&c=7&r=0&o=5&pid=1.7',
      text: 'aaa'
    },
    {
      id: '008',
      src: 'https://tse4-mm.cn.bing.net/th/id/OIP-C.36aML75xdQZgYH_p15N4UQAAAA?w=279&h=186&c=7&r=0&o=5&pid=1.7',
      text: 'aaa'
    },
    {
      id: '009',
      src: 'https://res.wx.qq.com/wxdoc/dist/assets/img/0.4cb08bb4.jpg',
      text: 'aaa'
    },
    {
      id: '010',
      src: 'https://tse3-mm.cn.bing.net/th/id/OIP-C.yIKOobCl8zz1068zJGi0eAHaLH?w=135&h=203&c=7&r=0&o=5&pid=1.7',
      text: 'aaa'
    },
    {
      id: '011',
      src: 'https://res.wx.qq.com/wxdoc/dist/assets/img/0.4cb08bb4.jpg',
      text: 'aaa'
    },
    {
      id: '012',
      src: 'https://res.wx.qq.com/wxdoc/dist/assets/img/0.4cb08bb4.jpg',
      text: 'aaa'
    },

    ]
  },
  onLoad: function () {
    this.setData({
      nbTitle: '新标题',
      nbLoading: true,
      nbFrontColor: '#ffffff',
      nbBackgroundColor: '#000000',
    })
  },
  loadMoreData: function () {
    if (this.isLoading) {
      return;
    }
    this.setData({
      isLoading: true,
    })
    setTimeout(() => {
      const newData = [...this.data.imgs, ...this.data.imgs];
      this.setData({
        imgs: newData,
        isLoading: false
      });
    }, 5000);

  }
})